If you wind up with an unhandled exception, its job will be cancelled.

So, in this example, the first job runs perfectly normally. The second job, though, gets cancelled after the NullPointerException, so it never completes to print the "This is executed after the second delay" message.

You can learn more about this in:
Tags:
Run Edit